/*
 * 全局loading的模块
 * @Author: ljb 
 * @Date: 2018-01-27 11:39:42 
 * @Last Modified by: ljb
 * @Last Modified time: 2018-01-30 10:31:03
 */
export default {

    namespaced: true,

    state: {
        spinshow :false,
        spin_text : '',
    },

    mutations: {
        showSpin(state,text){

            if( !state.spinshow ) {
                state.spinshow = true;
            }
            
            state.spin_text = text;
        },
        closeSpin(state){
            state.spinshow = false;
            state.spin_text = '';
        }
    },

    actions: {
        
    },

    getters: {
        getSpin (state){
            return state.spinshow;
        },
        getSpinText( state ){
            return state.spin_text;
        }
    }
};